package com.chen.controller;

import com.chen.dto.R;
import com.chen.model.LoginUser;
import com.chen.service.UserLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: chen
 * @Date: 2021/5/17 2:55 PM
 * @Version 1.0
 */
@RestController
public class RefreshTokenController {

    @Autowired
    private UserLoginService userLoginService;

    @PostMapping("/refreshToken")
    public R<LoginUser> refreshToken(){
        LoginUser loginUser = userLoginService.refreshToken();
        return R.ok(loginUser);
    }

}
